<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   主题：时间序列最小AIC  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({elements: ["bbpress-forums"]});
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/cn/topic/158318/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466441344: Accept with keywords: (title(0.333333333333):主题,时间序列,论坛, topn(0.366666666667):RSS订阅,软件应用,手动,帖子,会员,函数,用户名,游戏,主站,频率,源码,时间序列,格式,数据,向量,玩游戏,问题,密码,普通,阶数,理想,主题,总计,数据量,论坛,序列,识别,模型,好友,讨论区).-->
 </head>
 <body class="topic bbpress single single-topic postid-158318 single-author sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    主题：时间序列最小AIC
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/cn">
       <img src="http://cos.name/cn/wp-content/themes/COS-forest/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <div class="menu-%e8%8f%9c%e5%8d%951-container">
        <ul class="nav-menu" id="menu-%e8%8f%9c%e5%8d%951">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-407772" id="menu-item-407772">
          <a href="http://cos.name/cn/">
           论坛首页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407773" id="menu-item-407773">
          <a href="http://cos.name/cn/forums/">
           讨论区
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407774" id="menu-item-407774">
          <a href="http://cos.name/cn/wp-login.php?action=register">
           注册
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407819" id="menu-item-407819">
          <a href="http://cos.name/">
           主站
          </a>
         </li>
        </ul>
       </div>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-158318 topic type-topic status-publish hentry" id="post-158318">
        <header class="entry-header">
         <h1 class="entry-title">
          时间序列最小AIC
         </h1>
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <div id="bbpress-forums">
          <div class="bbp-breadcrumb">
           <p>
            <a class="bbp-breadcrumb-home" href="http://cos.name/cn/">
             COS论坛 | 统计之都
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-root" href="http://cos.name/cn/forums/">
             讨论区
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-forum" href="http://cos.name/cn/forum/software/">
             软件应用
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-forum" href="http://cos.name/cn/forum/software/r-language/">
             S-Plus &amp; R语言
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <span class="bbp-breadcrumb-current">
             时间序列最小AIC
            </span>
           </p>
          </div>
          <div class="bbp-template-notice info">
           <p class="bbp-topic-description">
            该主题包含 8 条回复，3个帖子，最后由
            <a class="bbp-author-avatar" href="http://cos.name/cn/profile/goupinde/" rel="nofollow" title="查看goupinde的档案">
             <img src="http://sdn.geekzu.org/avatar/dcac08175a89bbda70f2018bc3c74518?s=14&amp;d=monsterid&amp;r=g"/>
            </a>
            <a class="bbp-author-name" href="http://cos.name/cn/profile/goupinde/" rel="nofollow" title="查看goupinde的档案">
             goupinde
            </a>
            在
            <a href="http://cos.name/cn/topic/158318/#post-412181" title="回复：时间序列最小AIC">
             10 月, 1 周 之前
            </a>
            更新。
           </p>
          </div>
          <div class="bbp-pagination">
           <div class="bbp-pagination-count">
            查看 9 个帖子 - 1 到 9（总计 9 个）
           </div>
           <div class="bbp-pagination-links">
           </div>
          </div>
          <ul class="forums bbp-replies" id="topic-158318-replies">
           <li class="bbp-header">
            <div class="bbp-reply-author">
             作者
            </div>
            <!-- .bbp-reply-author -->
            <div class="bbp-reply-content">
             帖子
            </div>
            <!-- .bbp-reply-content -->
           </li>
           <!-- .bbp-header -->
           <li class="bbp-body">
            <div class="bbp-reply-header" id="post-158318">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2014年9月16日 上午8:22
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/158318/#post-158318">
               1 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-158318 -->
            <div class="odd bbp-parent-forum-999 bbp-parent-topic-158318 bbp-reply-position-1 user-id-382586 topic-author post-158318 topic type-topic status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/382586/" rel="nofollow" title="查看lixinyao的档案">
               <img src="http://sdn.geekzu.org/avatar/10823d7513af37e29e145484775274b9?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/382586/" rel="nofollow" title="查看lixinyao的档案">
               lixinyao
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               这是一个比较老的问题了，但是没找到详细的回答。
               <br/>
               主要用最小AIC给ARMA定阶
               <br/>
               代码如下：
              </p>
              <pre class="highlight ">get.best.arima &lt;- function(x.ts, maxord = c(1,1,1,1,1,1))
{
  best.aic &lt;- 1e8
  n &lt;- length(x.ts)
  for (p in 0:maxord[1]) for(d in 0:maxord[2]) for(q in 0:maxord[3])
    for (P in 0:maxord[4]) for(D in 0:maxord[5]) for(Q in 0:maxord[6])
    {
      fit &lt;- arima(x.ts, order = c(p,d,q),
      seasonal = list(order = c(P,D,Q),
      frequency(x.ts)), method = "CSS")
      fit.aic &lt;- -2 * fit$loglik + (log(n) + 1) * length(fit$coef)
      if (fit.aic &lt; best.aic)
      {
        best.aic &lt;- fit.aic
        best.fit &lt;- fit
        best.model &lt;- c(p,d,q,P,D,Q)
      }
    }
  list(best.aic, best.fit, best.model)
}
best.arima.elec &lt;- get.best.arima(x1,maxord = c(2,2,2,2,2,2))
best.fit.elec &lt;- best.arima.elec[[2]]
best.arima.elec [[3]]
</pre>
              <p>
               x1数据如下：
              </p>
              <pre>      Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
2010  928  519 2208 2053 1776 2193 1561 1617 2420 1190 1620 2146
2011  939  790 2673 1591 2297 2286 1661 2064 2147 1419 1902 2107
2012 1661  805 3411 2294 2485 2799 2049 2417 2620 1673 2410 2155
2013 1626 1136 3148 2839 2815 2217 2392 2462 2674 1770 2062 2670
2014 1547 1133 3774 2531 2617 2812 2618 2768
</pre>
              <p>
               错误如下：
              </p>
              <pre class="highlight "> Error in solve.default(res$hessian * n.used) :
  Lapack routine dgesv: system is exactly singular: U[3,3] = 0
</pre>
              <p>
               traceback如下：
              </p>
              <pre class="highlight ">5 solve.default(res$hessian * n.used)
4 solve(res$hessian * n.used)
3 stats:::arima(x = x, order = order, seasonal = seasonal, xreg = xreg,
    include.mean = include.mean, transform.pars = transform.pars,
    fixed = fixed, init = init, method = method, n.cond = if (!missing(n.cond)) n.cond,
    optim.control = optim.control, kappa = kappa)
2 arima(x.ts, order = c(p, d, q), seasonal = list(order = c(P,
    D, Q), frequency(x.ts)), method = "CSS")
1 get.best.arima(x5, maxord = c(2, 2, 2, 2, 2, 2))
</pre>
              <p>
               希望大家给予帮助，谢谢大家
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-406469">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2014年9月16日 下午1:25
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/158318/#post-406469">
               2 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-406469 -->
            <div class="even bbp-parent-forum-999 bbp-parent-topic-158318 bbp-reply-position-2 user-id-392669 post-406469 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/392669/" rel="nofollow" title="查看libingfei的档案">
               <img src="http://sdn.geekzu.org/avatar/480b3e74aded240ff746dba165e8189a?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/392669/" rel="nofollow" title="查看libingfei的档案">
               libingfei
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               回复 第1楼 的 lixinyao：
               <br/>
               &gt; best.fit.elec &lt;- best.arima.elec[[2]]
               <br/>
               &gt; best.arima.elec [[3]]
               <br/>
               [1] 2 0 2 0 2 1
               <br/>
               &gt;
               <br/>
               你输出的数据x1是多列像是多行.
               <br/>
               源码里：
               <br/>
               only implemented for univariate time series
              </p>
              <p>
               我运行没有问题，你的x1格式确定没有问题么？
               <br/>
               x1=c(928,519,2208,2053,1776,2193,1561,1617,2420,1190,1620,2146
               <br/>
               ,939,790,2673,1591,2297,2286,1661,2064,2147,1419,1902,2107
               <br/>
               ,1661,805,3411,2294,2485,2799,2049,2417,2620,1673,2410,2155
               <br/>
               ,1626,1136,3148,2839,2815,2217,2392,2462,2674,1770,2062,2670
               <br/>
               ,1547,1133,3774,2531,2617,2812,2618,2768)
              </p>
              <div class="bbp-signature">
               <p>
                请加加PSN游戏好友。
                <br/>
                PSN:libingfei
                <br/>
                我有理想，我的理想是随时可以玩游戏。
               </p>
              </div>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-406476">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2014年9月17日 上午12:42
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/158318/#post-406476">
               3 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-406476 -->
            <div class="odd bbp-parent-forum-999 bbp-parent-topic-158318 bbp-reply-position-3 user-id-382586 topic-author post-406476 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/382586/" rel="nofollow" title="查看lixinyao的档案">
               <img src="http://sdn.geekzu.org/avatar/10823d7513af37e29e145484775274b9?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/382586/" rel="nofollow" title="查看lixinyao的档案">
               lixinyao
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               回复 第2楼 的 libingfei：x1是一个时间序列
              </p>
              <pre class="highlight ">frequency(x1)=12</pre>
              <p>
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-406477">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2014年9月17日 上午1:04
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/158318/#post-406477">
               4 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-406477 -->
            <div class="even bbp-parent-forum-999 bbp-parent-topic-158318 bbp-reply-position-4 user-id-392669 post-406477 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/392669/" rel="nofollow" title="查看libingfei的档案">
               <img src="http://sdn.geekzu.org/avatar/480b3e74aded240ff746dba165e8189a?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/392669/" rel="nofollow" title="查看libingfei的档案">
               libingfei
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               回复 第3楼 的 lixinyao：是时间序列，arima函数，支持频率的识别么？
               <br/>
               arima(x.ts, order = c(p,d,q),seasonal = list(order = c(P,D,Q),frequency(x.ts)), method = “CSS”)
               <br/>
               你在这个函数第二个参数里设置了序列频率了，数据本身响亮型就行了吧
              </p>
              <div class="bbp-signature">
               <p>
                请加加PSN游戏好友。
                <br/>
                PSN:libingfei
                <br/>
                我有理想，我的理想是随时可以玩游戏。
               </p>
              </div>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-406486">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2014年9月17日 上午3:03
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/158318/#post-406486">
               5 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-406486 -->
            <div class="odd bbp-parent-forum-999 bbp-parent-topic-158318 bbp-reply-position-5 user-id-382586 topic-author post-406486 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/382586/" rel="nofollow" title="查看lixinyao的档案">
               <img src="http://sdn.geekzu.org/avatar/10823d7513af37e29e145484775274b9?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/382586/" rel="nofollow" title="查看lixinyao的档案">
               lixinyao
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               回复 第4楼 的 libingfei：您试试您的x1的频率等于多少。arima自己不会识别频率的。有人说是矩阵奇异问题，但是我不知道怎么解决
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-406489">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2014年9月17日 上午4:19
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/158318/#post-406489">
               6 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-406489 -->
            <div class="even bbp-parent-forum-999 bbp-parent-topic-158318 bbp-reply-position-6 user-id-392669 post-406489 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/392669/" rel="nofollow" title="查看libingfei的档案">
               <img src="http://sdn.geekzu.org/avatar/480b3e74aded240ff746dba165e8189a?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/392669/" rel="nofollow" title="查看libingfei的档案">
               libingfei
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               我的意思是：手动设置频率函数，将序列转为向量运算
               <br/>
               arima可能无法直接使用ts类型
              </p>
              <p>
               将函数修改如下：
              </p>
              <pre class="highlight ">get.best.arima &lt;- function(x.ts, maxord = c(1,1,1,1,1,1),freq=12)
{
  best.aic &lt;- 1e8
  n &lt;- length(x.ts)
  for (p in 0:maxord[1]) for(d in 0:maxord[2]) for(q in 0:maxord[3])
    for (P in 0:maxord[4]) for(D in 0:maxord[5]) for(Q in 0:maxord[6])
    {
      fit &lt;- arima(x.ts, order = c(p,d,q),
                   seasonal = list(order = c(P,D,Q),
                                   freq), method = "CSS")
      fit.aic &lt;- -2 * fit$loglik + (log(n) + 1) * length(fit$coef)
      if (fit.aic &lt; best.aic)
      {
        best.aic &lt;- fit.aic
        best.fit &lt;- fit
        best.model &lt;- c(p,d,q,P,D,Q)
      }
    }
  list(best.aic, best.fit, best.model)
}
</pre>
              <p>
              </p>
              <p>
              </p>
              <pre class="highlight ">x1=c(928,519,2208,2053,1776,2193,1561,1617,2420,1190,1620,2146
     ,939,790,2673,1591,2297,2286,1661,2064,2147,1419,1902,2107
     ,1661,805,3411,2294,2485,2799,2049,2417,2620,1673,2410,2155
     ,1626,1136,3148,2839,2815,2217,2392,2462,2674,1770,2062,2670
     ,1547,1133,3774,2531,2617,2812,2618,2768)
best.arima.elec &lt;- get.best.arima(x1,maxord = c(2,2,2,2,2,2),12)
</pre>
              <p>
              </p>
              <div class="bbp-signature">
               <p>
                请加加PSN游戏好友。
                <br/>
                PSN:libingfei
                <br/>
                我有理想，我的理想是随时可以玩游戏。
               </p>
              </div>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-406493">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2014年9月17日 上午6:16
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/158318/#post-406493">
               7 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-406493 -->
            <div class="odd bbp-parent-forum-999 bbp-parent-topic-158318 bbp-reply-position-7 user-id-382586 topic-author post-406493 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/382586/" rel="nofollow" title="查看lixinyao的档案">
               <img src="http://sdn.geekzu.org/avatar/10823d7513af37e29e145484775274b9?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/382586/" rel="nofollow" title="查看lixinyao的档案">
               lixinyao
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               回复 第6楼 的 libingfei：我可以肯定ts类型不会影响arima的使用。
               <br/>
               举个例子
               <br/>
               x1是向量，手动设置频率
              </p>
              <pre class="highlight ">arima(x1, order = c(1,1,1),
seasonal = list(order = c(1,1,1),12), method = "CSS")
</pre>
              <p>
               y是ts格式，频率为12
              </p>
              <pre class="highlight ">y=ts(x1,frequency=12)
arima(y, order = c(1,1,1),
seasonal = list(order = c(1,1,1),frequency(y)), method = "CSS")
</pre>
              <p>
               结果是不一样的，一个是ARIMA(1,1,1)，一个是ARIMA(1,1,1)*(1,1,1)[12]，而我想用的正好是乘法季节模型。谢谢您，感觉不是这个问题
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-406505">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2014年9月17日 上午9:15
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/158318/#post-406505">
               8 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-406505 -->
            <div class="even bbp-parent-forum-999 bbp-parent-topic-158318 bbp-reply-position-8 user-id-392669 post-406505 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/392669/" rel="nofollow" title="查看libingfei的档案">
               <img src="http://sdn.geekzu.org/avatar/480b3e74aded240ff746dba165e8189a?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/392669/" rel="nofollow" title="查看libingfei的档案">
               libingfei
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               统计学不好，翻了些文献，大概是这个问题。
               <br/>
               你的数据量不够，若是周期设置为12(月)的话你的数据,
               <br/>
               总周期数貌似需要是各阶层的和。
               <br/>
               另外，将周期降低也能解决你的问题。总之，就是数据量的问题。
               <br/>
               周期模型，随着阶数提高，周期数应该相应增高。
               <br/>
               (2,2,2)应该至少是7个周期的数据，6个周期就是单点了。
               <br/>
               2+2+2+1
               <br/>
               我也学习了，互相帮助吗
              </p>
              <pre class="highlight ">&gt; y
   Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
1  928  519 2208 2053 1776 2193 1561 1617 2420 1190 1620 2146
2  939  790 2673 1591 2297 2286 1661 2064 2147 1419 1902 2107
3 1661  805 3411 2294 2485 2799 2049 2417 2620 1673 2410 2155
4 1626 1136 3148 2839 2815 2217 2392 2462 2674 1770 2062 2670
5 1547 1133 3774 2531 2617 2812 2618 2768 2147 1419 1902 2107
6  928  519 2208 2053 1776 2193 1561 1617 2420 1190 1620 2146
7  928  519 2208 2053 1776 2193 1561 1617 2420 1190 1620 2146
&gt; best.arima.elec &lt;- get.best.arima(y,maxord = c(2,2,2,2,2,2))
&gt; best.fit.elec &lt;- best.arima.elec[[2]]
&gt; best.arima.elec [[3]]
[1] 2 2 1 2 2 0
&gt; 
</pre>
              <p>
              </p>
              <div class="bbp-signature">
               <p>
                请加加PSN游戏好友。
                <br/>
                PSN:libingfei
                <br/>
                我有理想，我的理想是随时可以玩游戏。
               </p>
              </div>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-412181">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2015年8月12日 下午3:25
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/158318/#post-412181">
               9 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-412181 -->
            <div class="odd bbp-parent-forum-999 bbp-parent-topic-158318 bbp-reply-position-9 user-id-420413 post-412181 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/goupinde/" rel="nofollow" title="查看goupinde的档案">
               <img src="http://sdn.geekzu.org/avatar/dcac08175a89bbda70f2018bc3c74518?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/goupinde/" rel="nofollow" title="查看goupinde的档案">
               goupinde
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               我也遇到相同的问题，提示以下信息，烦请知道的人帮忙解一下，谢谢：
               <br/>
               Error in solve.default(res$hessian * n.used, A) :
               <br/>
               Lapack routine dgesv: system is exactly singular: U[1,1] = 0
               <br/>
               In addition: Warning message:
               <br/>
               In arima(x.ts, order = c(p, d, q), seasonal = list(order = c(P,  :
               <br/>
               possible convergence problem: optim gave code = 1
               <br/>
               Called from: solve(res$hessian * n.used, A)
               <br/>
               数据如下：
               <br/>
               13014
               <br/>
               12696
               <br/>
               10773
               <br/>
               5797
               <br/>
               10853
               <br/>
               12169
               <br/>
               12424
               <br/>
               12037
               <br/>
               13561
               <br/>
               10643
               <br/>
               5860
               <br/>
               10989
               <br/>
               12566
               <br/>
               12366
               <br/>
               12759
               <br/>
               13659
               <br/>
               10797
               <br/>
               6187
               <br/>
               11275
               <br/>
               13756
               <br/>
               13197
               <br/>
               12708
               <br/>
               15128
               <br/>
               11823
               <br/>
               6729
               <br/>
               11739
               <br/>
               14493
               <br/>
               13374
               <br/>
               13584
               <br/>
               14368
               <br/>
               11848
               <br/>
               6602
               <br/>
               12653
               <br/>
               14298
               <br/>
               14472
               <br/>
               14268
               <br/>
               16903
               <br/>
               13198
               <br/>
               7120
               <br/>
               13794
               <br/>
               15193
               <br/>
               15276
               <br/>
               14797
               <br/>
               15498
               <br/>
               12627
               <br/>
               7395
               <br/>
               13476
               <br/>
               14935
               <br/>
               17760
               <br/>
               3325
               <br/>
               5906
               <br/>
               7685
               <br/>
               12354
               <br/>
               13870
               <br/>
               16558
               <br/>
               16763
               <br/>
               16637
               <br/>
               16615
               <br/>
               14746
               <br/>
               13321
               <br/>
               15395
               <br/>
               1737
               <br/>
               588
               <br/>
               943
               <br/>
               6953
               <br/>
               6914
               <br/>
               6286
               <br/>
               7579
               <br/>
               13154
               <br/>
               15228
               <br/>
               15036
               <br/>
               15338
               <br/>
               15709
               <br/>
               8027
               <br/>
               12871
               <br/>
               14897
               <br/>
               14720
               <br/>
               15090
               <br/>
               15737
               <br/>
               12998
               <br/>
               6902
               <br/>
               12999
               <br/>
               15226
               <br/>
               14619
               <br/>
               14357
               <br/>
               16696
               <br/>
               13134
               <br/>
               6909
               <br/>
               13601
               <br/>
               15964
               <br/>
               14939
               <br/>
               15555
               <br/>
               14329
               <br/>
               12850
               <br/>
               6521
               <br/>
               13545
               <br/>
               15174
               <br/>
               15554
               <br/>
               14867
               <br/>
               15859
               <br/>
               12351
               <br/>
               7348
               <br/>
               13986
               <br/>
               16306
               <br/>
               15937
               <br/>
               15153
               <br/>
               17260
               <br/>
               13552
               <br/>
               7657
               <br/>
               13638
               <br/>
               15239
               <br/>
               15685
               <br/>
               15177
               <br/>
               15473
               <br/>
               12831
               <br/>
               7026
               <br/>
               14231
               <br/>
               16365
               <br/>
               15077
               <br/>
               14885
               <br/>
               15221
               <br/>
               14020
               <br/>
               6567
               <br/>
               13093
               <br/>
               15542
               <br/>
               15215
               <br/>
               15265
               <br/>
               15890
               <br/>
               12662
               <br/>
               7195
               <br/>
               14157
               <br/>
               16010
               <br/>
               15056
               <br/>
               15265
               <br/>
               17681
               <br/>
               14205
               <br/>
               7361
               <br/>
               14081
               <br/>
               15212
               <br/>
               16110
               <br/>
               15898
               <br/>
               17281
               <br/>
               13300
               <br/>
               7276
               <br/>
               14243
               <br/>
               16534
               <br/>
               15757
               <br/>
               15857
               <br/>
               16756
               <br/>
               13517
               <br/>
               7839
               <br/>
               13976
               <br/>
               17275
               <br/>
               2725
               <br/>
               13168
               <br/>
               15832
               <br/>
               13601
               <br/>
               8419
               <br/>
               14718
               <br/>
               15924
               <br/>
               16016
               <br/>
               16543
               <br/>
               17275
               <br/>
               14450
               <br/>
               8721
               <br/>
               15220
               <br/>
               17915
               <br/>
               18196
               <br/>
               18276
               <br/>
               19720
               <br/>
               17147
               <br/>
               10382
               <br/>
               12309
               <br/>
               6625
               <br/>
               2769
               <br/>
               1123
               <br/>
               649
               <br/>
               93
               <br/>
               66
               <br/>
               23
               <br/>
               7
               <br/>
               1
               <br/>
               0
               <br/>
               0
               <br/>
               0
               <br/>
               0
               <br/>
               0
               <br/>
               0
               <br/>
               24
               <br/>
               0
               <br/>
               5
               <br/>
               90
               <br/>
               486
               <br/>
               12030
               <br/>
               12976
               <br/>
               10562
               <br/>
               10486
               <br/>
               8735
               <br/>
               7159
               <br/>
               4660
               <br/>
               10149
               <br/>
               11424
               <br/>
               11808
               <br/>
               12263
               <br/>
               12815
               <br/>
               10631
               <br/>
               5877
               <br/>
               10988
               <br/>
               12947
               <br/>
               13090
               <br/>
               13042
               <br/>
               13591
               <br/>
               10883
               <br/>
               6026
               <br/>
               12336
               <br/>
               13560
               <br/>
               13944
               <br/>
               13631
               <br/>
               14385
               <br/>
               11481
               <br/>
               6298
               <br/>
               12399
               <br/>
               14747
               <br/>
               14291
               <br/>
               13832
               <br/>
               14584
               <br/>
               11807
               <br/>
               6398
               <br/>
               14696
               <br/>
               14331
               <br/>
               14030
               <br/>
               14486
               <br/>
               14822
               <br/>
               12508
               <br/>
               6782
               <br/>
               12654
               <br/>
               14421
               <br/>
               14181
               <br/>
               14529
               <br/>
               15122
               <br/>
               11677
               <br/>
               6723
               <br/>
               12817
               <br/>
               14264
               <br/>
               14679
               <br/>
               14886
               <br/>
               18482
               <br/>
               3017
               <br/>
               5807
               <br/>
               8309
               <br/>
               13669
               <br/>
               15950
               <br/>
               14820
               <br/>
               15991
               <br/>
               13099
               <br/>
               6597
               <br/>
               14905
               <br/>
               15194
               <br/>
               14706
               <br/>
               15041
               <br/>
               15368
               <br/>
               12813
               <br/>
               7072
               <br/>
               14881
               <br/>
               15532
               <br/>
               15344
               <br/>
               15506
               <br/>
               15558
               <br/>
               12536
               <br/>
               7396
               <br/>
               14450
               <br/>
               15218
               <br/>
               17446
               <br/>
               2927
               <br/>
               4441
               <br/>
               5578
               <br/>
               12073
               <br/>
               14393
               <br/>
               15347
               <br/>
               14829
               <br/>
               14264
               <br/>
               14587
               <br/>
               12660
               <br/>
               6112
               <br/>
               14502
               <br/>
               14971
               <br/>
               15104
               <br/>
               14742
               <br/>
               15422
               <br/>
               12262
               <br/>
               6429
               <br/>
               13512
               <br/>
               14678
               <br/>
               15106
               <br/>
               14182
               <br/>
               15332
               <br/>
               11749
               <br/>
               6624
               <br/>
               13737
               <br/>
               15149
               <br/>
               14471
               <br/>
               14585
               <br/>
               15050
               <br/>
               10970
               <br/>
               5553
               <br/>
               1039
               <br/>
               12508
               <br/>
               13783
               <br/>
               14382
               <br/>
               14577
               <br/>
               12498
               <br/>
               6110
               <br/>
               12697
               <br/>
               14398
               <br/>
               14626
               <br/>
               13799
               <br/>
               14623
               <br/>
               11898
               <br/>
               5981
               <br/>
               14328
               <br/>
               13714
               <br/>
               13635
               <br/>
               13651
               <br/>
               15044
               <br/>
               11424
               <br/>
               6841
               <br/>
               13243
               <br/>
               13996
               <br/>
               13847
               <br/>
               13399
               <br/>
               14233
               <br/>
               12310
               <br/>
               6330
               <br/>
               12001
               <br/>
               14407
               <br/>
               13517
               <br/>
               13296
               <br/>
               14672
               <br/>
               10718
               <br/>
               6059
               <br/>
               13522
               <br/>
               13969
               <br/>
               13684
               <br/>
               13299
               <br/>
               14886
               <br/>
               11575
               <br/>
               6075
               <br/>
               12756
               <br/>
               14075
               <br/>
               14023
               <br/>
               13872
               <br/>
               15456
               <br/>
               10505
               <br/>
               6032
               <br/>
               13196
               <br/>
               14364
               <br/>
               13902
               <br/>
               14131
               <br/>
               15347
               <br/>
               12007
               <br/>
               6255
               <br/>
               12712
               <br/>
               14842
               <br/>
               14645
               <br/>
               14926
               <br/>
               14824
               <br/>
               10657
               <br/>
               5951
               <br/>
               13630
               <br/>
               14515
               <br/>
               14129
               <br/>
               14225
               <br/>
               15660
               <br/>
               12356
               <br/>
               6455
               <br/>
               13602
               <br/>
               14845
               <br/>
               14649
               <br/>
               15459
               <br/>
               16262
               <br/>
               12058
               <br/>
               6718
               <br/>
               15530
               <br/>
               15272
               <br/>
               15980
               <br/>
               15540
               <br/>
               17418
               <br/>
               13536
               <br/>
               7296
               <br/>
               15285
               <br/>
               16008
               <br/>
               16369
               <br/>
               16843
               <br/>
               18136
               <br/>
               13093
               <br/>
               9749
               <br/>
               14881
               <br/>
               15249
               <br/>
               15794
               <br/>
               16034
               <br/>
               19347
               <br/>
               12261
               <br/>
               6500
               <br/>
               1437
               <br/>
               13565
               <br/>
               15689
               <br/>
               16724
               <br/>
               17654
               <br/>
               14015
               <br/>
               7397
               <br/>
               16328
               <br/>
               16718
               <br/>
               16129
               <br/>
               16238
               <br/>
               19569
               <br/>
               15216
               <br/>
               8037
               <br/>
               15653
               <br/>
               19443
               <br/>
               17890
               <br/>
               18042
               <br/>
               20936
               <br/>
               15993
               <br/>
               11857
               <br/>
               15954
               <br/>
               16490
               <br/>
               2135
               <br/>
               661
               <br/>
               945
               <br/>
               7282
               <br/>
               6431
               <br/>
               7760
               <br/>
               9118
               <br/>
               16941
               <br/>
               18747
               <br/>
               17930
               <br/>
               16505
               <br/>
               8898
               <br/>
               16289
               <br/>
               17042
               <br/>
               16347
               <br/>
               16897
               <br/>
               18082
               <br/>
               14155
               <br/>
               7452
               <br/>
               15284
               <br/>
               17356
               <br/>
               17399
               <br/>
               16045
               <br/>
               18604
               <br/>
               14592
               <br/>
               7427
               <br/>
               14810
               <br/>
               16442
               <br/>
               16849
               <br/>
               16323
               <br/>
               17327
               <br/>
               15146
               <br/>
               6970
               <br/>
               15480
               <br/>
               16245
               <br/>
               16745
               <br/>
               16599
               <br/>
               19142
               <br/>
               12769
               <br/>
               8030
               <br/>
               16188
               <br/>
               17478
               <br/>
               16936
               <br/>
               17244
               <br/>
               20412
               <br/>
               15446
               <br/>
               7818
               <br/>
               16394
               <br/>
               18152
               <br/>
               17421
               <br/>
               18087
               <br/>
               18205
               <br/>
               13269
               <br/>
               7904
               <br/>
               17645
               <br/>
               18073
               <br/>
               16934
               <br/>
               16130
               <br/>
               17240
               <br/>
               14000
               <br/>
               7974
               <br/>
               16485
               <br/>
               16550
               <br/>
               16600
               <br/>
               16626
               <br/>
               18573
               <br/>
               12798
               <br/>
               7764
               <br/>
               16861
               <br/>
               19113
               <br/>
               16729
               <br/>
               17074
               <br/>
               19792
               <br/>
               15120
               <br/>
               8325
               <br/>
               16323
               <br/>
               17728
               <br/>
               17971
               <br/>
               18124
               <br/>
               18436
               <br/>
               13518
               <br/>
               7852
               <br/>
               16532
               <br/>
               18944
               <br/>
               16942
               <br/>
               16679
               <br/>
               19586
               <br/>
               14445
               <br/>
               8017
               <br/>
               15442
               <br/>
               16595
               <br/>
               17714
               <br/>
               4228
               <br/>
               6820
               <br/>
               8151
               <br/>
               15597
               <br/>
               17864
               <br/>
               18137
               <br/>
               18551
               <br/>
               18293
               <br/>
               18886
               <br/>
               15055
               <br/>
               8247
               <br/>
               16686
               <br/>
               18112
               <br/>
               17060
               <br/>
               17750
               <br/>
               19544
               <br/>
               13126
               <br/>
               8575
               <br/>
               18430
               <br/>
               18999
               <br/>
               19081
               <br/>
               18091
               <br/>
               21110
               <br/>
               14804
               <br/>
               8924
               <br/>
               19071
               <br/>
               18736
               <br/>
               19603
               <br/>
               19075
               <br/>
               20359
               <br/>
               17450
               <br/>
               10672
               <br/>
               21587
               <br/>
               24058
               <br/>
               24071
               <br/>
               23274
               <br/>
               26784
               <br/>
               20645
               <br/>
               12562
               <br/>
               15830
               <br/>
               12469
               <br/>
               4839
               <br/>
               2404
               <br/>
               478
               <br/>
               1099
               <br/>
               578
               <br/>
               206
               <br/>
               247
               <br/>
               30
               <br/>
               20
               <br/>
               29
               <br/>
               43
               <br/>
               52
               <br/>
               527
               <br/>
               25
               <br/>
               34
               <br/>
               523
               <br/>
               2204
               <br/>
               12107
               <br/>
               11900
               <br/>
               14325
               <br/>
               15532
               <br/>
               15563
               <br/>
               11336
               <br/>
               14218
               <br/>
               11989
               <br/>
               6449
               <br/>
               14618
               <br/>
               16051
               <br/>
               16909
               <br/>
               16599
               <br/>
               17818
               <br/>
               12860
               <br/>
               8389
               <br/>
               17300
               <br/>
               17529
               <br/>
               17645
               <br/>
               18247
               <br/>
               18603
               <br/>
               16367
               <br/>
               9108
               <br/>
               17755
               <br/>
               18776
               <br/>
               17623
               <br/>
               17369
               <br/>
               18833
               <br/>
               14683
               <br/>
               8727
               <br/>
               17734
               <br/>
               19017
               <br/>
               21061
               <br/>
               18799
               <br/>
               21221
               <br/>
               14027
               <br/>
               3184
               <br/>
               10123
               <br/>
               17275
               <br/>
               19016
               <br/>
               19137
               <br/>
               21758
               <br/>
               18428
               <br/>
               10065
               <br/>
               20094
               <br/>
               19930
               <br/>
               20230
               <br/>
               21107
               <br/>
               22050
               <br/>
               18936
               <br/>
               9533
               <br/>
               19503
               <br/>
               19679
               <br/>
               20787
               <br/>
               20178
               <br/>
               23071
               <br/>
               17436
               <br/>
               11448
               <br/>
               21586
               <br/>
               21317
               <br/>
               18255
               <br/>
               26093
               <br/>
               5598
               <br/>
               8216
               <br/>
               9873
               <br/>
               18841
               <br/>
               19517
               <br/>
               20246
               <br/>
               19081
               <br/>
               21526
               <br/>
               18873
               <br/>
               10492
               <br/>
               19066
               <br/>
               21238
               <br/>
               22822
               <br/>
               19751
               <br/>
               21521
               <br/>
               19012
               <br/>
               9661
               <br/>
               18240
               <br/>
               20047
               <br/>
               20576
               <br/>
               20634
               <br/>
               22193
               <br/>
               15653
               <br/>
               10477
               <br/>
               19841
               <br/>
               19946
               <br/>
               21596
               <br/>
               19944
               <br/>
               20765
               <br/>
               18821
               <br/>
               13347
               <br/>
               18688
               <br/>
               19264
               <br/>
               20825
               <br/>
               19402
               <br/>
               20528
               <br/>
               15182
               <br/>
               10535
               <br/>
               20167
               <br/>
               19565
               <br/>
               21509
               <br/>
               17946
               <br/>
               18412
               <br/>
               17352
               <br/>
               9738
               <br/>
               19632
               <br/>
               20598
               <br/>
               22262
               <br/>
               20408
               <br/>
               21950
               <br/>
               5581
               <br/>
               9209
               <br/>
               11890
               <br/>
               19762
               <br/>
               21493
               <br/>
               18891
               <br/>
               19380
               <br/>
               18482
               <br/>
               9735
               <br/>
               17568
               <br/>
               22894
               <br/>
               20352
               <br/>
               20562
               <br/>
               21126
               <br/>
               16076
               <br/>
               10331
               <br/>
               20694
               <br/>
               21262
               <br/>
               20455
               <br/>
               19529
               <br/>
               19605
               <br/>
               17497
               <br/>
               10148
               <br/>
               20335
               <br/>
               20606
               <br/>
               20935
               <br/>
               19006
               <br/>
               19753
               <br/>
               15207
               <br/>
               9763
               <br/>
               20285
               <br/>
               21189
               <br/>
               19585
               <br/>
               19321
               <br/>
               19573
               <br/>
               17159
               <br/>
               9586
               <br/>
               18031
               <br/>
               18449
               <br/>
               17908
               <br/>
               18739
               <br/>
               20271
               <br/>
               15153
               <br/>
               9303
               <br/>
               19907
               <br/>
               20704
               <br/>
               20264
               <br/>
               19330
               <br/>
               19912
               <br/>
               18074
               <br/>
               9964
               <br/>
               20255
               <br/>
               20599
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
           </li>
           <!-- .bbp-body -->
           <li class="bbp-footer">
            <div class="bbp-reply-author">
             作者
            </div>
            <div class="bbp-reply-content">
             帖子
            </div>
            <!-- .bbp-reply-content -->
           </li>
           <!-- .bbp-footer -->
          </ul>
          <!-- #topic-158318-replies -->
          <div class="bbp-pagination">
           <div class="bbp-pagination-count">
            查看 9 个帖子 - 1 到 9（总计 9 个）
           </div>
           <div class="bbp-pagination-links">
           </div>
          </div>
          <div class="bbp-no-reply" id="no-reply-158318">
           <div class="bbp-template-notice">
            <p>
             您必须先登录才能回复该主题。
            </p>
           </div>
          </div>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
       <div class="comments-area" id="comments">
       </div>
       <!-- #comments -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget bbp_widget_login" id="bbp_login_widget-2">
         <h3 class="widget-title">
          登录
         </h3>
         <form action="http://cos.name/cn/wp-login.php" class="bbp-login-form" method="post">
          <fieldset>
           <legend>
            登录
           </legend>
           <div class="bbp-username">
            <label for="user_login">
             用户名:
            </label>
           </div>
           <div class="bbp-password">
            <label for="user_pass">
             密码:
            </label>
           </div>
           <div class="bbp-remember-me">
            <label for="rememberme">
             记住用户名
            </label>
           </div>
           <div class="bbp-submit-wrapper">
            <button class="button submit user-submit" id="user-submit" name="user-submit" tabindex="104" type="submit">
             登录
            </button>
           </div>
           <div class="bbp-login-links">
            <a class="bbp-register-link" href="http://cos.name/cn/wp-login.php?action=register" title="注册">
             注册
            </a>
            <a class="bbp-lostpass-link" href="http://cos.name/cn/wp-login.php?action=lostpassword" title="忘记密码">
             忘记密码
            </a>
           </div>
          </fieldset>
         </form>
        </aside>
        <aside class="widget widget_text" id="text-7">
         <h3 class="widget-title">
          搜索
         </h3>
         <div class="textwidget">
          <form action="http://www.google.com/search" id="bbp-search-form" method="get" onsubmit="Gsitesearch(this)" role="search">
           <div>
           </div>
          </form>
          <form id="bbp-search-form-baidu" onsubmit="g(this)" role="search">
           <div>
           </div>
          </form>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          新鲜事
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/cn/topics/">
             最新帖子
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/popular/">
             最热门主题
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/no-replies/">
             消灭零回复
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          RSS订阅
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/topics/feed/">
             所有主题
            </a>
           </li>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/forums/feed/">
             所有帖子
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
  </div>
 </body>
</html>